package com.xyy.saas.payment.dao.mapper;

import com.xyy.saas.payment.dao.model.PayAmountReport;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PayAmountReportMapper {

    int insert(PayAmountReport entity);

    List<PayAmountReport> pageByParam(@Param("queryParam") PayAmountReport queryParam,
                                      @Param("startTime") String startTime,
                                      @Param("endTime") String endTime,
                                      @Param("offset") int offset,
                                      @Param("limit") int limit);

    List<PayAmountReport> pageByGroupParam(@Param("queryParam") PayAmountReport queryParam,
                                      @Param("startTime") String startTime,
                                      @Param("endTime") String endTime,
                                      @Param("offset") int offset,
                                      @Param("limit") int limit);

    List<PayAmountReport> queryByParam(@Param("queryParam") PayAmountReport queryParam,
                                       @Param("startTime") String startTime,
                                       @Param("endTime") String endTime);

    long getTotal(@Param("queryParam") PayAmountReport queryParam,
                  @Param("startTime") String startTime,
                  @Param("endTime") String endTime);

    int updateAmountById(@Param("id") Long id, @Param("amount") int amount);

}
